Conventional databases store data in tables with columns and rows. In a relational database, tables are related or linked to one another. A new paradigm for databases comprises adding XML data to cells within a relational database. With the addition of native XML support in databases, the queries required to find, manipulate, and publish data stored in a conventional database have become more complex. Not only has the structure of the data changed, the language used to query and publish this data has also changed to support this new database paradigm.
A conventional query language comprises either XQuery to support XML or SQL to support relational databases. To query data in this new database paradigm, XQuery is added to query the XML portions of the relational database. XQuery is capable of querying hierarchical XML data. For a conventional database that is primarily a relational store, the existing SQL querying capabilities remain intact. Besides allowing the ability to publish relational data as XML, additional SQUXML functionality decomposes XML data and publishes the decomposed XML data as a relational table. Added to this functionality, this database paradigm also supports functions that can perform XSL transformations to publish XML data in another XML format.
In general, this new database paradigm can support relational and XML mapping capabilities in querying and publishing language such as, for example, relational structure mapped to XML structure and vice versa, XML structure mapped to XML structure, and relational structure mapped to relational structure.
Conventional databases typically use a conventional query builder to aid a developer or user in the generation of complex queries for a relational database. Although this technology has proven to be useful, it would be desirable to present additional improvements. These conventional query builders are designed for only relational to relational querying and publishing cannot build queries over data structured in the new database paradigm. Users currently build queries that combine aspects of XML and relational searches by bringing up an XQuery builder and a SQL query builder, cutting and pasting partial queries from the XQuery builder and the SQL query builder, and manually integrating the partial queries. Neither the XQuery builder nor the SQL query builder is able to publish relational data as XML or decompose XML data as relational data. Publishing relational data as XML or decomposing XML data as relational data requires a separate mapping tool. Consequently, the process of querying over XML data and relational data is cumbersome; a user is required to build combined queries using more than one tool, each with a different user experience.
What is needed is a unified query builder that queries and publishes across relational data and XML data in a transparent manner such that the development experience of the user does not change with respect to the type of data being queried. The user should be able to store both relational and XML data in a database without understanding the internal storage mechanism. Similarly, the user should be able to query the data and publish the results without having to understand semantic changes in the querying and publishing languages. Provided the user understands the structure of the data, the user should be able to identify any data or any part of the data to query, publish, and modify the data. The present method for building a unified query spans heterogeneous environments from any data source such as, for example, relational databases, XML data stores, web-based data, data feeds, a file system, etc. The need for such a solution has heretofore remained unsatisfied.